/**
 * Created by xiongcheng on 2018/3/1.
 */
import Vue from 'vue'
import * as axios from 'axios'
import $ from 'jquery'
import _ from 'lodash'
import Cookies from 'js-cookie'
import echarts from 'echarts'
import { sync } from 'vuex-router-sync'

export const require = (url, resolve) => {
    require([url], resolve)

    // resolve => require([url],resolve)
}

/**
 * app初始化，注入一些插件，vue原型属性和方法
 */

export function appInitInject(store, router) {
    //同步route实例到vuex
    // sync(store, router)
    //    注入原型工具类方法
    Vue.prototype.$axios = axios
    Vue.prototype.$_ = _
    Vue.prototype.$$ = $
    Vue.prototype.$Cookies = Cookies
    Vue.prototype.$echarts = echarts

}